package org.test.elasticsearch.core;


import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * @author LHB
 * @date 2019/12/5 16:23
 */
@Document(indexName = "foo",type = "person")
public class Student {
    @Id
    private Integer id;
    @Field(type = FieldType.Text,index = true)
    private String name;
    @Field(type = FieldType.Text,index = false)
    private String age;
    @Field(type = FieldType.Text,index = true)
    private String sex;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }
}
